﻿namespace OasisCiq.Xpil
{
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using Xnl;
    using XS;

    /// <summary>
    /// Relationship with a party. e.g. Friend, Wife, 
    /// referee. organisation, customer. etc
    /// </summary>
    public class Relationship : IDataQualityGroup, IExtendedAttributes
    {
        public NameLine NameLine { get; set; }

        public PersonNameType PersonName { get; set; }

        public OrganisationNameType OrganisationName { get; set; }

        public Addresses Addresses { get; set; }

        public ContactNumbers ContactNumbers { get; set; }

        public ElectronicAddressIdentifiers ElectronicAddressIdentifiers { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// </summary>
        public StatusList Status { get; set; }

        /// <summary>
        /// Type of party involved in the relationship, i.e. person or organisation
        /// </summary>
        public PartyTypeList PartyType { get; set; }

        /// <summary>
        /// If tha party is person, then the type of relationship with 
        /// the person such as Friend, Mother, wife, contact, referee
        /// </summary>
        public PersonRelationshipTypeList RelationshipWithPerson { get; set; }

        /// <summary>
        /// If tha party is organisation, then the type of relationship with
        /// the organisation such as employer, branch, head office, subsidiary, etc
        /// </summary>
        public OrganisationRelationshipTypeList RelationshipWithOrganisation { get; set; }

        public XSDateTime RelationshipValidFrom { get; set; }

        public XSDateTime RelationshipValidTo { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public XSDateTime ValidTo { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}
